<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateUserSignsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_signs', function (Blueprint $table) {
            $table->id()->comment('用户签到表');
            $table->integer('user_id')->index()->comment('签到用户');
            $table->string('title',255)->comment('签到说明');
            $table->integer('number')->comment('获得积分');
            $table->integer('balance')->comment('剩余积分');
            $table->integer('count')->comment('签到次数');
            $table->string('remarks')->nullable()->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_signs');
    }
}
